<?php
namespace Home\Controller;
use Think\Controller;
class ResultController extends Controller {
    public function index(){
    	$sid = I('get.s_id');
    	$s_result = M('Student')->find($sid);
    	// var_dump($s_result);

    	$this->assign('s_info',$s_result);
        $this->display('result');
    }

    public function sent(){    
	    if($_POST){
	    	$r=sendMail(I('post.addr'),I('post.name').'的成绩单',I('post.url'));
		    if($r){
			    echo "success";
			}else{
			    echo "fail!";
			}
	    }
	    
	}
}